package io.renren.modules.echarts.controler;

import io.renren.modules.echarts.ResVo.BarVo;
import io.renren.modules.echarts.ResVo.LineVo;
import io.renren.modules.echarts.ResVo.PieVo;
import io.renren.modules.echarts.service.LeftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *
 * @author Administrator
 */

@CrossOrigin
@RestController
@RequestMapping("/api")
public class LeftContorler {
    @Autowired
    private LeftService leftService;

    @GetMapping("/line")
    public List<LineVo> getLineData() {
        return leftService.getLineAllData();
    }

    @GetMapping("/bar")
    public List<BarVo> getBarAllData(){
        return leftService.getBarAllData();
    }

    @GetMapping("/pie")
    public List<PieVo> getPieAllData(){
        return leftService.getPieAllData();
    }
}
